<?php
/**
 *	Kolor
 *
 *	Theme by: Art Ramadani
 *	Developed by: Arlind Nushi
 *
 *	www.laborator.co
 */


/* Five Column Sidebar */
$sidebar_widgets = array(
	'id' => 'sidebar_widgets',
	'name' => 'Main Sidebar',
	
	'before_widget' => '<div class="sidebar_entry">',
	'after_widget' => '</div>'
);

register_sidebar($sidebar_widgets);



/* Footer Widgets */
$footer_widgets = array(
	'id' => 'footer_widgets',
	'name' => 'Footer (Up to 4 Widgets)',
	
	'before_widget' => '<div class="four columns footer_block">',
	'after_widget' => '</div>'
);

register_sidebar($footer_widgets);


/* Add Title Icons */
add_filter('widget_title', 'kolor_add_widget_icons');


function kolor_add_widget_icons($title)
{
	global $post;
	
	$d = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT);
	$o = $d[3];
	
	$widget_search_instance = $o['object'];
	$id_base = $widget_search_instance->id_base;
	
	
	$icon = '<i class="' . $id_base . '"></i>';
	
	if($title)
		return "{$icon} {$title}";
	
	return $title;
}